package com.webservice.service;

import com.webservice.service.impl.WeatherServiceImplService;

/**
 * @author: 若若叶
 * @date: 2021/9/27 15:50 FileName: WebServiceClient Description:
 */
public class WebServiceClient {
  public static void main(String[] args) {

    // 获取服务视图（视图从wsdl文档的service标签的name属性值获取）
    com.webservice.service.impl.WeatherServiceImplService service = new WeatherServiceImplService();
    // 获取服务实现类 （从wsdl文档的portType的name属性值获取）
    WeatherServiceImpl port = service.getPort(WeatherServiceImpl.class);
    // 调用方法
    String weather = port.getWeather("深圳");
    System.out.println(weather);
  }
}
